package javango.polls;


import java.util.ArrayList;
import java.util.List;

import com.google.inject.Inject;

import javango.core.Url;
import javango.core.UrlFactory;

public class Urls implements javango.core.Urls {
	List<Url> l = new ArrayList<Url>();

	@Inject
	public Urls(UrlFactory urlFactory) {
		l.add(urlFactory.regUrl("^$", Views.class, "index"));
	    l.add(urlFactory.regUrl("^(\\d+)/$", Views.class, "detail"));
	    l.add(urlFactory.regUrl("^(\\d+)/results/$", Views.class, "results"));
	    l.add(urlFactory.regUrl("^(\\d+)/vote/$", Views.class, "vote"));
	    l.add(urlFactory.subappUrl("^admin/", javango.contrib.admin.Urls.class));
	}
	
	public List<Url> getUrlPatterns() {
		return l;
	}

}
